***Figure 6: Mean Standardized Settings Compared to Non-Violent Video Condition, by Previous Exposure to Violent Media***


**Video games - high (above median)**

sum violence_videogames if round == 1, d
local median_vg = r(p50)
di `median_vg'

*RVV - standardized
ttest intensityduration_mean_all if (treatment == 1 | treatment == 3) & round == 1 & violence_videogames > `median_vg', by(treatment)
replace t_meanr_stavm = (r(mu_1)-r(mu_2)) in 10
replace t_upperr_stavm = ((r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5)))) in 10
replace t_lowerr_stavm = ((r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5)))) in 10

*FVV - standardized
ttest intensityduration_mean_all if (treatment == 2 | treatment == 3) & round == 1 & violence_videogames > `median_vg', by(treatment)
replace t_meanf_stavm = r(mu_1)-r(mu_2) in 10
replace t_upperf_stavm = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 10
replace t_lowerf_stavm = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 10

anova intensityduration_mean_all treatment if (treatment == 1 | treatment == 2) & round == 1 & violence_videogames > `median_vg'
replace pvalue_stavm = Ftail(e(df_m), e(df_r), e(F)) in 10


**Video games - low (at or below median)**

*RVV - standardized
ttest intensityduration_mean_all if (treatment == 1 | treatment == 3) & round == 1 & violence_videogames <= `median_vg', by(treatment)
replace t_meanr_stavm = (r(mu_1)-r(mu_2)) in 11
replace t_upperr_stavm = ((r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5)))) in 11
replace t_lowerr_stavm = ((r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5)))) in 11

*FVV - standardized
ttest intensityduration_mean_all if (treatment == 2 | treatment == 3) & round == 1 & violence_videogames <= `median_vg', by(treatment)
replace t_meanf_stavm = r(mu_1)-r(mu_2) in 11
replace t_upperf_stavm = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 11
replace t_lowerf_stavm = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 11

anova intensityduration_mean_all treatment if (treatment == 1 | treatment == 2) & round == 1 & violence_videogames <= `median_vg'
replace pvalue_stavm = Ftail(e(df_m), e(df_r), e(F)) in 11


**News - high (above median)**

sum violence_news if round == 1, d
local median_news = r(p50)
di `median_news'

*RVV - standardized
ttest intensityduration_mean_all if (treatment == 1 | treatment == 3) & round == 1 & violence_news > `median_news', by(treatment)
replace t_meanr_stavm = (r(mu_1)-r(mu_2)) in 12
replace t_upperr_stavm = ((r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5)))) in 12
replace t_lowerr_stavm = ((r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5)))) in 12

*FVV - standardized
ttest intensityduration_mean_all if (treatment == 2 | treatment == 3) & round == 1 & violence_news > `median_news', by(treatment)
replace t_meanf_stavm = r(mu_1)-r(mu_2) in 12
replace t_upperf_stavm = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 12
replace t_lowerf_stavm = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 12

anova intensityduration_mean_all treatment if (treatment == 1 | treatment == 2) & round == 1 & violence_news > `median_news'
replace pvalue_stavm = Ftail(e(df_m), e(df_r), e(F)) in 12


**News - low (at or below median)**

*RVV - standardized
ttest intensityduration_mean_all if (treatment == 1 | treatment == 3) & round == 1 & violence_news <= `median_news', by(treatment)
replace t_meanr_stavm = (r(mu_1)-r(mu_2)) in 13
replace t_upperr_stavm = ((r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5)))) in 13
replace t_lowerr_stavm = ((r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5)))) in 13

*FVV - standardized
ttest intensityduration_mean_all if (treatment == 2 | treatment == 3) & round == 1 & violence_news <= `median_news', by(treatment)
replace t_meanf_stavm = r(mu_1)-r(mu_2) in 13
replace t_upperf_stavm = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 13
replace t_lowerf_stavm = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 13

anova intensityduration_mean_all treatment if (treatment == 1 | treatment == 2) & round == 1 & violence_news <= `median_news'
replace pvalue_stavm = Ftail(e(df_m), e(df_r), e(F)) in 13


**TV - high (above median)**

sum violence_tv if round == 1, d
local median_tv = r(p50)
di `median_tv'

*RVV - standardized
ttest intensityduration_mean_all if (treatment == 1 | treatment == 3) & round == 1 & violence_tv > `median_tv', by(treatment)
replace t_meanr_stavm = (r(mu_1)-r(mu_2)) in 14
replace t_upperr_stavm = ((r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5)))) in 14
replace t_lowerr_stavm = ((r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5)))) in 14

*FVV - standardized
ttest intensityduration_mean_all if (treatment == 2 | treatment == 3) & round == 1 & violence_tv > `median_tv', by(treatment)
replace t_meanf_stavm = r(mu_1)-r(mu_2) in 14
replace t_upperf_stavm = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 14
replace t_lowerf_stavm = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 14

anova intensityduration_mean_all treatment if (treatment == 1 | treatment == 2) & round == 1 & violence_tv > `median_tv'
replace pvalue_stavm = Ftail(e(df_m), e(df_r), e(F)) in 14


**TV - low (at or below median)**

*RVV - standardized
ttest intensityduration_mean_all if (treatment == 1 | treatment == 3) & round == 1 & violence_tv <= `median_tv', by(treatment)
replace t_meanr_stavm = (r(mu_1)-r(mu_2)) in 15
replace t_upperr_stavm = ((r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5)))) in 15
replace t_lowerr_stavm = ((r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5)))) in 15

*FVV - standardized
ttest intensityduration_mean_all if (treatment == 2 | treatment == 3) & round == 1 & violence_tv <= `median_tv', by(treatment)
replace t_meanf_stavm = r(mu_1)-r(mu_2) in 15
replace t_upperf_stavm = (r(mu_1)-r(mu_2))+(r(sd_1)/(r(N_1)^(0.5))) in 15
replace t_lowerf_stavm = (r(mu_1)-r(mu_2))-(r(sd_1)/(r(N_1)^(0.5))) in 15

anova intensityduration_mean_all treatment if (treatment == 1 | treatment == 2) & round == 1 & violence_tv <= `median_tv'
replace pvalue_stavm = Ftail(e(df_m), e(df_r), e(F)) in 15


**Convert p-values to three digits for graphs**

replace pvalue_stavm = round(pvalue_stavm,0.001)
replace pvalue_stavm = pvalue_stavm*1000
rename pvalue_stavm pvalue_stavmold
tostring pvalue_stavmold,gen(pvalue_stavm)
gen count = length(pvalue_stavm)
replace count =  0 if pvalue_stavm == "."
replace pvalue_stavm =  "" if pvalue_stavm == "."
replace pvalue_stavm = "0.00" + pvalue_stavm if count == 1
replace pvalue_stavm = "0.0" + pvalue_stavm if count == 2
replace pvalue_stavm = "0." + pvalue_stavm if count == 3
drop count


**Create the graph**

local pvalue_stavm = pvalue_stavm in 10

twoway  (bar t_meanr_stavm x_r if _n == 10, barwidth(0.5) color(gs8) lcolor(black) lwidth(vthin) ) (rcap t_upperr_stavm t_lowerr_stavm x_r if _n == 10, lcolor(black)) (bar t_meanf_stavm x_f if _n == 10, barwidth(0.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_stavm t_lowerf_stavm x_f if _n == 10, lcolor(black)), xscale( lstyle(none)) xlabel(0 " " 1 `""{bf:Video Games}" "{stSans:({it:p} = `pvalue_stavm')}"'  2 " ",notick labsize(small)) ylabel(-.15 " " -.1 "-0.10" -.05 "-0.05" 0 .05 "+0.05" .1 "+0.10" .15 " ", nogrid notick labgap(2) labsize(vsmall)) ytick(-.1 -.05 0 .05 .1) yline(0) name(intensitydurationhighvg, replace)  legend(off) note("  " "  " "  ", ring(1) pos(6) size(medium)) graphregion(margin(0 0 0 0))

local pvalue_stavm = pvalue_stavm in 14

twoway  (bar t_meanr_stavm x_r if _n == 14, barwidth(0.5) color(gs8) lcolor(black) lwidth(vthin) ) (rcap t_upperr_stavm t_lowerr_stavm x_r if _n == 14, lcolor(black)) (bar t_meanf_stavm x_f if _n == 14, barwidth(0.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_stavm t_lowerf_stavm x_f if _n == 14, lcolor(black)), xscale(lstyle(none)) xlabel(0 " " 1 `""{bf:Television/Movies}" "{stSans:({it:p} = `pvalue_stavm')}"'  2 " ",notick labsize(small)) yscale(off) yline(0) ylabel(,nogrid) name(intensitydurationhightv, replace) note("High Exposure" "  " "  ", ring(1) pos(6) size(medium)) graphregion(margin(0 0 0 0)) legend(off)

addplot intensitydurationhightv: pcarrowi 0.15 1 0.14 1.2 (9) " Standard errors" lcolor(black), norescaling mlabsize(vsmall) msize(vtiny) lwidth(vthin) legend(off)

local pvalue_stavm = pvalue_stavm in 12

twoway  (bar t_meanr_stavm x_r if _n == 12, barwidth(0.5) color(gs8) lcolor(black) lwidth(vthin) ) (rcap t_upperr_stavm t_lowerr_stavm x_r if _n == 12, lcolor(black)) (bar t_meanf_stavm x_f if _n == 12, barwidth(0.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_stavm t_lowerf_stavm x_f if _n == 12, lcolor(black)), xscale(lstyle(none)) xlabel(0 " " 1 `""{bf:News}" "{stSans:({it:p} = `pvalue_stavm')}"'  2 " ",notick labsize(small)) yscale(off) yline(0) ylabel(,nogrid) name(intensitydurationhighnews, replace) legend(off) note("  " "  " "  ", ring(1) pos(6) size(medium)) graphregion(margin(0 0 0 0))

local pvalue_stavm = pvalue_stavm in 11

twoway  (bar t_meanr_stavm x_r if _n == 11, barwidth(0.5) color(gs8) lcolor(black) lwidth(vthin) ) (rcap t_upperr_stavm t_lowerr_stavm x_r if _n == 11, lcolor(black)) (bar t_meanf_stavm x_f if _n == 11, barwidth(0.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_stavm t_lowerf_stavm x_f if _n == 11, lcolor(black)), xscale( lstyle(none)) xlabel(0 " " 1 `""{bf:Video Games}" "{stSans:({it:p} = `pvalue_stavm')}"'  2 " ",notick labsize(small)) ylabel(-.15 " " -.1 "-0.10" -.05 "-0.05" 0 .05 "+0.05" .1 "+0.10" .15 " ", nogrid notick labgap(2) labsize(vsmall)) ytick(-.1 -.05 0 .05 .1) yline(0) name(intensitydurationlowvg, replace)  legend(off) note(" " "  " "  ", ring(1) pos(6) size(medium)) graphregion(margin(0 0 0 0))

local pvalue_stavm = pvalue_stavm in 15

twoway  (bar t_meanr_stavm x_r if _n == 15, barwidth(0.5) color(gs8) lcolor(black) lwidth(vthin) ) (rcap t_upperr_stavm t_lowerr_stavm x_r if _n == 15, lcolor(black)) (bar t_meanf_stavm x_f if _n == 15, barwidth(0.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_stavm t_lowerf_stavm x_f if _n == 15, lcolor(black)), xscale(lstyle(none)) xlabel(0 " " 1 `""{bf:Television/Movies}" "{stSans:({it:p} = `pvalue_stavm')}"'  2 " ",notick labsize(small)) yscale(off) yline(0) ylabel(,nogrid) name(intensitydurationlowtv, replace) legend(off) note("Low Exposure" "  " "  ", ring(1) pos(6) size(medium)) graphregion(margin(0 0 0 0))

local pvalue_stavm = pvalue_stavm in 13

twoway  (bar t_meanr_stavm x_r if _n == 13, barwidth(0.5) color(gs8) lcolor(black) lwidth(vthin) ) (rcap t_upperr_stavm t_lowerr_stavm x_r if _n == 13, lcolor(black)) (bar t_meanf_stavm x_f if _n == 13, barwidth(0.5) color(white) lcolor(black) lwidth(vthin)) (rcap t_upperf_stavm t_lowerf_stavm x_f if _n == 13, lcolor(black)), xscale(lstyle(none)) xlabel(0 " " 1 `""{bf:News}" "{stSans:({it:p} = `pvalue_stavm')}"'  2 " ",notick labsize(small)) yscale(off) yline(0) ylabel(,nogrid) name(intensitydurationlownews, replace) legend(off) note(" " "  " "  ", ring(1) pos(6) size(medium)) graphregion(margin(0 0 0 0))

addplot intensitydurationlownews: pcarrowi .1 0 .025 .05  (12) "NVV baseline", lcolor(black) norescaling mlabsize(vsmall) msize(vtiny) lwidth(vthin) legend(off)

graph combine intensitydurationhighvg intensitydurationhightv intensitydurationhighnews intensitydurationlowvg intensitydurationlowtv intensitydurationlownews, iscale(1) ycommon imargin(-1.05) cols(3) xsize(1.25) ysize(1) name(violentmediacombined, replace) title({bf:})  note(" " " " "{space 13}{bf: Note:} {it:p}-values refer to a one-way ANOVA between the RVV and FVV, testing the hypothesis that {&mu}{subscript:RVV} = {&mu}{subscript:FVV}.", size(vsmall)) l1title("{space 25}Difference from Non-Violent Video (NVV) Group",orientation(vertical) size(small)) 

graph export Graphs/figure-6.pdf, replace

graph drop intensitydurationhighvg intensitydurationhightv intensitydurationhighnews intensitydurationlowvg intensitydurationlowtv intensitydurationlownews
